package spaces;

import com.appclient.ControlledScreen;
import com.appclient.ScreensController;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.StackPane;

/**
 *
 * @author Sawior
 */
public class SpacesState implements Initializable, ControlledScreen {

    private ScreensController myController;
    @FXML
    private StackPane spaces;

    @Override
    public void initialize(URL url, ResourceBundle rb) {
    }

    public void initialize() {
        Spaces spacesGetter = new Spaces(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
            }
        }, Spaces.ENTRY, null, null, null, null);
        spaces.getChildren().add(0, spacesGetter.getSpacesForEntries());
    }

    @Override
    public void setScreenParent(ScreensController screenParent) {
        myController = screenParent;
        initialize();
    }
}
